package work.mediway.mdm.biz.entity.dict;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import javax.validation.constraints.NotBlank;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * 业务域字典
 *
 * @author zhongyj <1126834403@qq.com><br/>
 * @date 2020/12/17
 */
@ApiModel(value = "业务域字典")
@Data
@TableName(value = "CT_BusinessField")
public class CtBusinessField {
    /**
     * 代码
     */
    @TableId(value = "CTBF_Code", type = IdType.INPUT)
    @ApiModelProperty(value = "代码(新增时不填,更新时必填)")
    @NotBlank(message = "更新时代码不能为空")
    private String code;

    /**
     * 代码表类型
     */
    @TableField(value = "CTBF_CodesystemCode")
    @ApiModelProperty(value = "代码表类型", hidden = true)
    private String codeSystemCode;

    /**
     * 描述
     */
    @TableField(value = "CTBF_Desc")
    @ApiModelProperty(value = "描述")
    private String descr;

    /**
     * 备注
     */
    @TableField(value = "CTBF_Remarks")
    @ApiModelProperty(value = "备注")
    private String remarks;

    /**
     * 状态（1启用,0停用,-1删除）
     */
    @TableField(value = "CTBF_Status")
    @ApiModelProperty(value = "状态（1启用,0停用,-1删除）", allowableValues = "-1,1,0", required = true)
    private String status;

    /**
     * 更新日期
     */
    @TableField(value = "CTBF_UpdateDate")
    @ApiModelProperty(value = "更新日期", hidden = true)
    private String updateDate;

    /**
     * 更新时间
     */
    @TableField(value = "CTBF_UpdateTime")
    @ApiModelProperty(value = "更新时间", hidden = true)
    private String updateTime;

    /**
     * 最后更新人编码
     */
    @TableField(value = "CTBF_UpdateUserCode")
    @ApiModelProperty(value = "最后更新人编码", required = true)
    @NotBlank(message = "更新人编码不能为空")
    private String lastUpdateUserId;

    /**
     * 最后更新日期
     */
    @TableField(value = "UpdateDate")
    @ApiModelProperty(value = "最后更新日期", hidden = true)
    private String lastUpdateDate;

    /**
     * 最后更新时间
     */
    @TableField(value = "UpdateTime")
    @ApiModelProperty(value = "最后更新时间", hidden = true)
    private String lastUpdateTime;
}